Fix getAssetsIndex task for FG1.0#1075
Conversation
954e0eb to
57c9ee0
Compare
| public static final OperatingSystem OPERATING_SYSTEM = getOs(); | ||
| public static final SystemArch SYSTEM_ARCH = getArch(); | ||
| public static final String HASH_FUNC = "MD5"; | ||
| public static final String USER_AGENT = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11"; |
There was a problem hiding this comment.
Do not run code formatters over existing code.
It makes your entire change set a pain to actually read/understand
There was a problem hiding this comment.
I formatted it on a whim, do I need to undo it?
There was a problem hiding this comment.
Yes, code changes should be actual changes not formatting. It makes it a pain to see what you actually changed.
| public static final String FERNFLOWER = "{CACHE_DIR}/minecraft/fernflower.jar"; | ||
| public static final String EXCEPTOR = "{CACHE_DIR}/minecraft/exceptor.jar"; | ||
| public static final String ASSETS = "{CACHE_DIR}/minecraft/assets"; | ||
| public static final String JSONS_DIR = "{CACHE_DIR}/minecraft/versionJsons"; |
There was a problem hiding this comment.
Don't use upper cases in directory names
There was a problem hiding this comment.
This path was copied directly from FG 1.2, which allows resource files to be stored together with other versions of FG. Do you think it needs to be changed?
|
Ya, gave this another pass, can you provide an example buildscript that you've used to test this? |
This is a development package I packaged locally, similar to MDK 1.7.10. This is the build script it uses. It uses Gradle 4. The version numbers might be inconsistent because the Gradle version wasn't upgraded in the PR. I remember seeing this PR with version 1.0.1 |
The script has been provided; I recall that setupWorkspace and build are both available. |
| import java.io.IOException; | ||
| import java.nio.charset.Charset; | ||
| import java.nio.charset.StandardCharsets; | ||
| import java.nio.file.Files; |
There was a problem hiding this comment.
java.nio doesnt exist in java 6 Which is required to decompile the game correctly due to bugs in fernflower.
java.nio.file.Files was added in java 7
FG 1.2 works fine with this because it uses an updated Fernflower with stabilization
There was a problem hiding this comment.
I'm considering whether to upgrade compatibility to Java 7 or 8. Java 6 is practically obsolete.
There was a problem hiding this comment.
There are several other places that also mention the 1.7 API, but I don't know why they don't affect compilation.
There was a problem hiding this comment.
They dont effect compilation because youre using the system java to compile. Which is probably java 8+
There was a problem hiding this comment.
I'm considering whether to upgrade compatibility to Java 7 or 8. Java 6 is practically obsolete.
Yes, there isnt even a distro for modern macs. Which is what im running into for mavenizer.
But its not possible to bump the required java version until the fernflower issues i stated are fixed.
There was a problem hiding this comment.
I've tested it locally, and directly upgrading the version didn't reveal any bugs. I've even compiled and run the mod using my fixed FG. So I want to know what the problem is.
|
Alright, so needed to get a functional FG1.1 branch up and running. Part of my blocker is that sonatype has died, and thus the SpecialSource snapshot we use for deobf is gone. Once I fix the Fernflower on Java 8 issue, it'll let me complete my current project of Mavenizer support for FG 1 & 2. Which means 1.6.4->1.12.2 will work on FG7. (Currently I have 1.8-1.12.2 working as they use a fixed FernFlower) But, im off for a while. So if you can look into that and let me know that'd be great. Else i'll look into it when i get back home. |
420c284 to
b5cc10e
Compare
|
Sorry, I don't have this version of SpecialSource either. I found that there seems to be a 1.7.2 version of SpecialSource in the central Maven repository. Can't use this one? |
Naw, there are behavioral differences between those versions that cause decompile to break |
That's terrible news. |
|
@LexManos Could you recompile this specific version? I've found the corresponding commit. |
|
Its one of these builds LexManos/SpecialSource@1addd1b...e1ab7c7 |
@LexManos Please review it